import request from '../http.js'
// 车牌添加
export const userCarAdd = plateNumber => {
	return request({
			url: `/user/car/add/${plateNumber}`,
			method: 'POST',
	})
}

// 车牌列表
export const userCarList = data => {
	return request({
			url: `/user/car/list`,
			method: 'GET',
			data
	})
}

// 根据默认车牌号，查询订单数据
export const getUnpaidOrder = data => {
	return request({
			url: `/order/getUnpaidOrder`,
			method: 'POST',
			data
	})
}

// 查询侧停车累计的欠费记录是否缴清
export const outdoorCheckDebt = portId => {
	return request({
			url: `/order/union/outdoor/checkDebt/${portId}`,
			method: 'GET',
	})
}

// 出场接口
export const tempLicenseOut = data => {
	return request({
			url: `/carcome/tempLicense/out`,
			method: 'POST',
			data
	})
}

// 临时牌出场接口
export const carcomeSimilar = portId => {
	return request({
			url: `/carcome/similar/${portId}`,
			method: 'GET',
	})
}

// 通过出场id，查询订单数据
export const getUnpaidOrderPortId = portId => {
	return request({
			url: `/order/getUnpaidOrder/${portId}`,
			method: 'GET',
	})
}

// 查询临时车牌的订单数据
export const getTempLicenseOrder = data => {
	return request({
			url: `/order/getTempLicenseOrder`,
			method: 'POST',
			data
	})
}

// 道闸扫码支付
export const wechatRailPay = data => {
	return request({
			url: `/alipay/pay/outPay`,
			method: 'post',
			data
	})
}

// 道闸扫码支付
export const wechatAdvancePay = data => {
	return request({
			url: `/alipay/pay/orderPay`,
			method: 'post',
			data
	})
}

// 获取用户信息
export const getUserInfo = data => {
	return request({
			url: `/alipay/appletUser/getUser`,
			method: 'GET',
			data
	})
}

// 获取商家信息
export const getMerchantInfo = data => {
	return request({
			url: `/merchant/getInfo`,
			method: 'GET',
			data
	})
}

// 用户扫码领取
export const getQrcodeInfo = qrcodeId => {
	return request({
			url: `/merchant/getQrcodeInfo/${qrcodeId}`,
			method: 'GET',
	})
}

// 用户扫码领取
export const qrcodeToPhone = data => {
	return request({
			url: `/merchant/qrcodeToPhone`,
			method: 'POST',
			data
	})
}

// 用户扫码领取
export const fullReductionToPhone = data => {
	return request({
			url: `/merchant/fullReductionToPhone`,
			method: 'POST',
			data
	})
}

// 根据出入口码获取信息
export const portGetInfo = data => {
	return request({
			url: `/port/getInfo`,
			method: 'POST',
			data
	})
}

// 获取用户信息
export const getUser = data => {
	return request({
			url: `/wechat/oaUser/getUser`,
			method: 'GET',
			data
	})
}

// 用户扫码
export const userScan = qrcodeId => {
	return request({
			url: `/merchant/userScan/${qrcodeId}`,
			method: 'POST',
	})
}